Page({
  data: {
    latitude: 40.653110000000005,
    longitude: 109.84021000000003,
    markers: [ {
      id: 0,
      iconPath: "/images/map6.png",
      latitude: 40.653830000000005,
      longitude: 109.84031000000003,
      title: ' 幸福小区',
      label: {
        content: ' 幸福小区',
        color: '#d81e06'
      },
      width: 30,
      height: 30
    }]



  },
  onReady: function (e) {
    this.mapCtx = wx.createMapContext('myMap')
    this.getCenterLocation();

  },

  getCenterLocation: function () {
    var that = this
    this.mapCtx.getCenterLocation({
      success: function (res) {
        var latitude = res.latitude
        var longitude = res.longitude
        that.setData({
          latitude: latitude,
          longitude: longitude,
        })
      }
    })

  },
 
   
  includePoints: function () {
    this.mapCtx.includePoints({
      padding: [10],
      points: [{
        latitude: 23.10229,
        longitude: 113.3345211,
      }, {
        latitude: 23.00229,
        longitude: 113.3345211,
      }]
    })
  }
})